package com.yqkj.modules.sys.service.impl;

import com.yqkj.modules.sys.dao.SysMenuDao;
import com.yqkj.modules.sys.dao.SysUserDao;
import com.yqkj.modules.sys.dao.SysUserTokenDao;
import com.yqkj.modules.sys.entity.SysUserEntity;
import com.yqkj.modules.sys.entity.SysUserTokenEntity;
import com.yqkj.modules.sys.service.ShiroService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * @author wuyj
 * @email wuyj298@163.com
 * @date 2018年07月24 17:16
 */
@Service("shiroService")
public class ShiroServiceImpl implements ShiroService{
    @Autowired
    private SysUserDao sysUserDao;

    @Autowired
    private SysUserTokenDao sysUserTokenDao;

    @Autowired
    private SysMenuDao sysMenuDao;

    @Override
    public SysUserEntity queryUser(Long userId) {
        return sysUserDao.queryObject(userId);
    }

    @Override
    public SysUserTokenEntity queryByToken(String token) {
        return sysUserTokenDao.queryByToken(token);
    }

    @Override
    public Set<String> getUserPermissions(long userId) {
        return null;
    }
}
